/**
 * Copyright (C) 2025 ROKAE (Beijing) Technology Co., LTD.
 * All Rights Reserved.
 *
 * Information in this file is the intellectual property of Rokae Technology Co., Ltd,
 * And may contains trade secrets that must be stored and viewed confidentially.
 *
 * @file RLStatusWidget.cpp
 * @brief RL Status 指令
 */
#include "RLStatusWidget.h"
#include "ui_RLStatusWidget.h"

xplugin::RLStatusWidget::RLStatusWidget(const QString &type, QWidget *parent)
    :RLContentBase(parent)
    ,ui(new Ui::RLStatusWidget)
{
    ui->setupUi(this);
    setType(type);
}

xplugin::RLStatusWidget::~RLStatusWidget()
{
    delete ui;
}

void xplugin::RLStatusWidget::FillWith(const QString &str)
{
    qDebug() << "xplugin::RLStatusWidget::FillWith : " << m_type << " : " << str;
}

QString xplugin::RLStatusWidget::ToString()
{
    QString lab1 = QString::number(ui->spinBox_clawID->value());
    QString lab2 = ui->comboBox_Status->currentText();
    QString lab3 = ui->comboBox_externalWidth->currentText();
    QString lab4 = ui->comboBox_internalWidth->currentText();
    QString lab5 = ui->comboBox_Force->currentText();
    return m_type + QString(" %1,%2,%3,%4,%5").arg(lab1).arg(lab2).arg(lab3).arg(lab4).arg(lab5);
}

bool xplugin::RLStatusWidget::CheckInsert()
{
    return true;
}

